package com.thrc.borrow.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.thrc.borrow.dao.NewsDao;
import com.thrc.borrow.entity.News;
import com.thrc.borrow.vo.NewsVo;

@Service
public class NewsService implements BaseService<News, NewsVo> {

	@Autowired
	private NewsDao newsDao;

	@Override
	public NewsVo selectById(News t) {
		return newsDao.selectById(t);
	}

	@Override
	public List<NewsVo> selectAll(News t) {
		return newsDao.selectAll(t);
	}

	@Override
	public int selectCount(News t) {
		return newsDao.selectCount(t);
	}

	@Override
	public List<NewsVo> selectByPage(News t) {
		t.setStartRow(t.getPageIndex(), t.getPageSize());
		return newsDao.selectByPage(t);
	}

	@Override
	public void update(News t) {
		newsDao.update(t);
	}

	@Override
	public void delete(News t) {
		newsDao.delete(t);
	}

	@Override
	public void insert(News t) {
		newsDao.insert(t);
	}

}
